package com.resume.bean;

import com.resume.domain.XueLi;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 * @Author: 梁云亮
 * @Date: 2021/7/14 7:40
 * @Describe: 获取到的数据的封装
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class DataTableResponse<T> {
    /**
     * 当前显示的页码
     */
    private Integer sEcho;
    /**
     * 共多少条记录
     */
    private Integer iTotalRecords;
    /**
     * 过滤后的记录数
     */
    private Integer iTotalDisplayRecords;
    /**
     * 具体的数据
     */
    private List<T> aaData;

    public static void main(String[] args) {
        DataTableResponse<XueLi> response = new DataTableResponse<>();
        response.setSEcho(3);
        response.setITotalRecords(80);
        response.setITotalDisplayRecords(70);
        response.setAaData(List.of(new XueLi(11, "大专", "这个学历现在还行，几年之后就不好说了", 3), new XueLi(11, "大专", "这个学历现在还行，几年之后就不好说了", 3)));
        System.out.println(response);
    }
}
